Skip to content

feat: make allowed commit types configurable#26

Merged
benner merged 2 commits into
mainfrom
feat/configurable-types
Apr 23, 2026
Merged

feat: make allowed commit types configurable#26
benner merged 2 commits into
mainfrom
feat/configurable-types

Conversation

@benner
Copy link
Copy Markdown
Owner

@benner benner commented Apr 23, 2026

Projects using non-standard types (e.g. wip, deploy) had no way to
teach commit-guard about them without forking. --types replaces the
default set entirely, so projects can enforce exactly the types they use.

Supported via --types CLI flag and types key in .commit-guard.toml;
CLI takes precedence over config.

benner added 2 commits April 23, 2026 16:33
Decouples the function from the global TYPES constant so callers can
pass a custom set. Defaults to TYPES to preserve existing behaviour.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
Projects using non-standard types (e.g. wip, deploy) had no way to
teach commit-guard about them without forking. --types replaces the
default set entirely, so projects can enforce exactly the types they use.

Supported via --types CLI flag and types key in .commit-guard.toml;
CLI takes precedence over config.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
@benner benner marked this pull request as ready for review April 23, 2026 13:41
@benner benner merged commit 9e71e8e into main Apr 23, 2026
4 checks passed
@benner benner deleted the feat/configurable-types branch April 23, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant